Switched from deprecated Connection to more updated version (maybe needed by the previous commit)