Removed  from controller and changed code to solve  issue