Fix model selection bug