fix chmod on smem-loop