Fix theme related crash