Fix bug in get_light method