fixing the javascript so it will correctly propegate values