sort menu buttons correctly