Fix bugs with saving profiles.: