fixing console.log() issue