Refix layout encoding