fixed wait.for issues