Fixing typo in waitFor