Bugfix determining daylight