fix exception catch