#5 reproduced in test
fixes #5 by closing connection