Hopefully fixed closing issues.