Perhaps have this in a finally-block?