fix a bug in asynchronous model generator