better handling of precompiled model