fixed permission bug