fix exception issues