adding the scanner change to make it work in v8