Fixed some error issues on the edit form