Expand empty while loop and mark the works to be finished