permission bug fixed