fix a bug in direct illumination