cleaned up bare receive
better debug printf
fixed tos length bug