Fixing minor bug - added 2 try catches