Fixes to make passing error and domain tests