Fix right margin / image border issue.

Fixes #556.