Fixed RingQueue missing elements.
Added debugging logs, fixed deadlock in networkprotocol.java