Fix OR encoding