Changes + fixed bug in encodeJD