fix to try catch exception