Fixed bug in recursive waiving functinos.