fix exception rescuing