chmod and fixes