Moved the use of project_path into the if statement. For #224