Fixed some bugs when loading demo data or starting new files