fixed a bug in the 16 bit 3D version