quick fix for sort problem