Added another check in controller