Fix permissions and options