Ensure pool.getConnection retrieves good connections

fixes #778