Fix not to use loop