fixed a bug on folder permission