Domain error fixes (#3159)