a couple Hex-edits to correct longstanding bugs (I can no longer edit the source since Processing2)