Don't throw an error when close is called multiple times. Fixes #211