Fix createdAt to work without updatedAt. Closes #2160