cosmetic fixes+closing correct connection