Fixing date check