fix bugs if enum instance's class is inner class of enum class