Fix error in entity form. closes #2650