Fix mongo sort query for the incidents module.