fixing permissions issues