Fix crash when creating project

Fixes #322