fixed incorrect enum comparision