bug fix with model loading