fixed err in controller