Hopefully fixed an issue crashing on the main sleep