Fix issue where loading screen would stay stuck.