fix to acking packets, works (I think) until edge cases