loop bug fix - no longer loops if not indicated in XML