fixed a bug in lighting