Fixed javascript input issue