Fixing createRecord with id bug