Fixed error with pubjson encoder