Fixed daylight sensor bugs.