fix javascript issue