fixed several bugs related to saving projects