Fix permission bug