Fixed permission bug