Fix 1px offset of background image - Closes issue #990
Fix unit tests
Merge pull request #1001 from Kienz/patch-1

Fix 1px offset of background image. Closes #990