fixing rank sizes jap