Update close() mechanism