Improved initial connection check