some js fixes
merge