fixed broken javascript issue