Fix Closing Errors