Used enum value was incorrect