Fix signature sorting issue