Changed resetWaivedStatuses function to use for loops.