Fixed wait for next execution
Added comments