fix breakage with sort buttons