Fix cmap parsing

Fixes the bug mentionned in #47 and the regression introduced by the previous fix.