Fixed a minor race condition in ZeroGen model