minor fixes on js
minor fixes on js