some fixes in js