Fix crash when settings are opened. Fixes #23