Improved Exception Handling

Also corrected exception handling on line 60