Fix domain error