Attempted to fix close errors