Bugfix in HOCR generation function