Fixing permission bug[]