Inner dimensions need to be sorted too