some changes to smooth porting to Gemstone