Some minor js fixes