beta first

fixing sending data, need to close communication if communication was
end