Fixed the code for settings