Fix bugs when tapping space too fast before finishing loading will result in a crash. Remove unnecessary code