fixed a complex value bug