fix main loop time
fix forgotten time delta when overlap