Fixed js bugs && export csv