Fixes permissions.