remove console.log
fix error when graph is not initialized yet