Infinite loop of script