[THEIA] Correct issue with disconnect() function