fix check valid model