Fixed looping bug and UADE multi file case problem