small fix in js, closes #11