Fixed bug in console.log