fixes in XBee code