fix model save func