bug fix in controller for update attributes