Fixing permissions and other silly things