I added a check to make sure the received buffer contains the expected data.