Fixed a simple logical error in the code