added onlyif to prevent some errors