Fixed bug in loop `then` handling