Use cl-dotimes to avoid infinite loop