fix 'undefined has disconnected'