Fix for new records which don't have an ID yet.