strict sequencing of reads

also adds idle command test and fixes disconnecting