Avoid possible index error when looking up gene for result
Use more logical procedure to find ranked gene