Closes issue #4859. --HG-- branch : trunk
Patch by Paradox (some cleanups was needed) --HG-- branch : trunk
closes issue 4669 (first 5 patches rolled into 1) Patch by Paradox --HG-- branch : trunk