Fixed bug related with image's edges.