Fix ruler layout