Might be a good idea to put this inside `try-finally`.