Fix crash when adding a favorite for the first time.