No, I suggest you look at the changes in your original commit and check what code is in what if.
I'm confused as to what that code is doing. and what is wrong, especially considering that the mission is working as intended. Do I want to not skip the routine if it is a mission but skip it if it is a command?