Fixes permissions