edited Exceptions and added 'else' in condition which checking controller