Fix bugs with settings