Fixing bugs in JS API
Autocommit Wed Sep 24 10:13:43 EST 2014