Fix for PR, remove useless loop