Added in a connection check