Fixed some cases of enum comparison combined with branching.
Merge pull request #3 from BeeWarloc/enum-compare-fix

Fixed some cases of enum comparison combined with branching.