moved autoloop js up to stop ocassional glitch