Remove a loop where one wasn't needed