Fix module parsing where multiple attempts occur