Added some error handling code
DataReceive bugfix, now correctly processes data