Added check and wait for pending slaves