fix bug while saving setting