some changes for edges of cgrid images