ugly hack to hopefully fix sorting