database path added to url for new sites

i've just recently moved from a standalone WP 3.0.1. site with buddypress to one with WPMU active.
I'm running it on a vps at Dreamhost who have activated wildcard dns.
When I installed it I got the message about using subdomains not directories.
Despite that it installed as a sub directory installation.
I followed the instructions to change to a subdomain setup by changing wp-config and the .htaccess file
Now if I go in as super admin and add a new site it is automatically set up with the path to the database appended to the URL, which the server can't find.
So instead of it looks for test.domain.comdomain.com_5 which is the db name tagged on to the url.
Any idea of what's happening would be greatly appreciated.