fix for issue: github.com/cytoscape/cytoscape.js/issues/234