Fix mongo bug with getListRange

Fixes #768