This is a bug fix for a flawed patch I put in lk 2.4.19 (sg version 3.1.24) and has been carried through into the 2.5 series. Thanks to Andy Polyakov for pointing this out (more than once). The sg.h header didn't get updated last time I submitted an sg patch so this patch also addresses that. Doug Gilbert