Fixed crashes in settings