Fix bad clipping at edges of .img file