removed undefs in generator