error checking in item controller and fix update format bug