Generator bug fixed