Fix shifts ending at midnight bug