Fix possible crash when setting axis titles