Updated rankall script for a bug