Fix bug when loading projects