Updated to lastest sort_r