edit permission bug fix