fix check date bug