fix issue in factory, fix bug in model contest