Fixed settings saving functionality