fix #605, bad result_type in tocomplex