bug fixes and light work