Python 3 compat on decoder