createRecord bug fix