Fix branching statement while loading external modules