Fixes two errors in the generator template