Fixes permissions bug.