Fixed some bugs with handling disconnects and sequence numbers

useful tip: can run requester repeatedly with
sh -c "while [ 1 ]; do ./request; done;"
Commited to correct folder now