Trying to fix small js bugs.