Fix crash when going to the setting page