Some small fixes for next JS SDK release

Don't really know what happened to my commits here, but the diffs are correct.