Some bugs of class generator were fixed