Minor fixes in the day-night script