fix bug saving profile