wait() function not working properly

Seems it started working properly again.
Looks like a few system restarts did the trick.