Fixing bug where images would be generated 1px wide