Update class
Fix bug in generator