Fixed the logical error.