Fixed one small issue with the connection not closing.