fix sorting
put back code for model page