minor: fixing logical error