Added some fixes. Need to end connection properly