fixed issue with json Encoder