Fixed JS bug in Chrome driver