Sort symbols when adding or removing function