Corrected logical error.