Tentative fix for parsing issue and loop issue