fix 2 bugs in comment sort key creation