Fix few things on the connection