Sleeping now works, now to fix the runtime errors