Fixed bug in xbeeSleep method