modify flash setting code.