change test connection string and fix bugs