Fix bugs when loading/saving projects