Fixes some permissions issues.