fix sorting button bug