Fixed bugs in settings