Fixed Runtime Exception For Generator