Topology and stability of integrable systems