fixed some minor errors in the light.cpp