FIXED: error in RCM sorting