Fixed compiler warnings regarding enum comparison.