added blocking test
fixed set_blocking (issue #2)