correct error on image edges