Fix crash when entering settings menu