fix chmod errors