now can avoid to crash when plotting a complex function