Fixes some broad exception catches