Misc JS bugs.