fixed settings function