Fix crash when setting title

Change-Id: I3d4e1c37fee72850521b7b5736f81d8022b9f745