Small bug fixed for function checking in tryexc