Small fixes in the JS driver