squash bug in closing Flask web server (fixes #131)