Fix save model function on modelpage