Fix bug instantiate inner class.