updating bkref on failure and sort order