Fixed datetime issues.