fixed bugs in post buffering algorithm
algorithm is pretty much completely functional now