add thread safe bug fix and reference to light