small js fixes