Fix json Serialization of Terms, all unit tests should pass now