fixed bug in testbench sim for buffer code