fix some permission problems