change db name. fix some db stuff