fixed edit and update actions in controller and view