Fixed syntax error in generator