fix posible error while sending data over bluetooth