Fixed incorrect enum constant calling, which could cause crashes.