Fixed bug in optimal model new