Fixed issues for generation