fixed it when time was past midnight