fixing console.error invocation