fixed midnight issue