fix settings logic