fix bug and modify setting