fixed a complex number checking issue