rearranged some metalink code