Waiting outside the function didn't affect the forks inside the function
Bit of cleaning up
Fix for the common invisible cursor problem