fix bugs in Barricade tool.