Trying to fix the javascript for the wizard