fixed light rerfences error happening to soon