fixed bugs in blocking