Fixed datetime issue