Fix assignation order for generatedClass

Old assignation could cause errors to some code checkers ([] should not be used for reading)