Adding checking if there is data to send