Fixing exception issues