Fixed #54 midnight bug