fixed chmod ordering issue