The code on line 102 wasn't working, something about box not having a .id attribute. Is this a openjpeg 2.0 / 1.5 bug? Anyway this seemed to fix it, don't know if it is a good way to do it.