Fix sorting on installhistory

Fixes #168