when there is empty db there is problem with id clash that wasn't foreseen
this should resolve issue reported by @nils.christian
Root cause of this bug is that there was identifier clashes in the subfolder generation. There was no problem up to now because all our production server had really high id number and probability of the clash was minimized. With clean empty db that we have we new installs all ids start with 1 and therefore possibility that ids in different table for the same project would be the same is high.