new parameters and edge cases.
Merged frostwire-common changes