Fix enum class handling