fixed initial bug that occured when creating new record