Fix js bugs in Analysis page