Fix js bug 

issue no. 2894