Logical error
Avoiding double wait.