looptime calculation fixed that caused the application to detrmeine a faulty state.