Corrected a logical error.