Removed excess bool variable assignment in `if`s