fix bug (console(error) -> console.log(error))