fix onlyif functionality