attempt to fix "Not a valid datetime value" error