Fix binary encoding on search