fix flexible of the code