fixed mote purging bug, better debugging