some small js fixes