added check for array of depth==1 in placePatch