fix testing; exception handler