Fixing datetime complications