fixed bug with javascript file