Now with correct sorting!

Fixed up sorting that wasn't being largest-smallest. Also added some
more debugging for actually catching it :/