Improve connection test