Problem solved!

When replacing the db name i used Replace instead of replaces, so the first replacacement of the db did only occour