added failed lookup tracking, fixed mentions sort