minor fixes on js