Fix updating rank