fix domain error