fix some bugs in JSON serializartion and cors filter sevlet