fixed exception creation
fixed tests