fixed java script issue