Fixed prepareTimestamps method in order to check for the timestamps attribute before actually adding the fields.