solves type errors when some unpredictable socket.io error occurs