avoid domain error