Added casting to model manager