Fixed focus and UI commands.
Updates to fix handling of malformed packets.