more fixes in javascript