Fixed wrong usages of console.error