fix enum type mismatch