Fixing type with console.err