Fix day/night checking in a sort of ugly way