fixed code for when no precompiled model is provided.