Fix warning by using connection