fixed bugs in router buffer