make exception testing more robust;