added more waitFor...() to fix some tests