fixed a bug in receive_xml() line 368: should be || instead of &&.
added more tests