Fix opcodes handling.
Fix packets serialization.