fixed minus endless looping bug in reading and sending data