Fix issue where Hammy would fail on very small images