fix exception problems