Fixed Condition so it would pass all the tests