Fixed errors with persisting/saving models via API.