Fix bugs in dim of ord space