Fixed some generation issues