corrected a minor issue with order of JS loads