correct waitFor condition