PR: 7173 Submitted by: Dom Mitchell <dom@myrddin.demon.co.uk>
PR: 6660 Submitted by: Andrey Zakhvatov <andy@icc.surw.chel.su>