Fix node and edge click issue