Fixed crash if mainTitle is nil.