fixed error message on new and edit item bug