Fixed bug with waiting for the UI before starting
- Would like to avoid using the while-loop and depreciated #sleep method