Fix bug when changing pulse source 2nd time