Erroneous console.log