fix exception with exception handling