Fix some bugs with the loading screen