Remember the flag selection. Close #1270