fix a few permissions issues