Fix exception if not in a project