Revert "Remove outdated bug fix from If command that was causing other issues."

This reverts commit 16b174ae3a5710d2cede58b5f1871bab87d76c1a.