fixed the onlyif conditions