Minor fixes in the js library