Fixes #4659 Fix if statement logic ftw.
Let's see if build is still passing