fixing class ordering