fix file permission bug