JSAPI fixes
Merge pull request #325 from patriot1burke/master

jsapi fixes