slightly better handling of complex numbers