small fixes for js