fix: bug in catch code
Merge pull request #495 from redv/fix_loading_crash

fix: bug in catch code