small fixes on js