Updated button to prevent error when attempting to set title to undefined