Change a bit protocol_helper.js - this is still dirty but i think i see how it should be done