Hopefully fixed time comparison issue