little js fixes