Fixes silly bug in rank conversion from 0-based to 1-based