Fixing bugs introduced when commenting out datetime