some js fixes and such