Fixed errors related to project creation

Project creation failed on importing test data (reseting user account)
because of changes to the way project texts are now handled. Moved
around a small bit of code to fix the problem.