fix a wrong condition