Fix bug that would run program twice using JM_UI.