Fixes end of day time error