Add support for waituntil