Fixed exception. Just a derp on my part for not checking if it's open
before trying to close it.