Fixed loop timing script