Solved a bug that caused nasty errors when sorting non integer scalar values.