PR: 7125 Submitted by: Andrey Zakhvatov <andy@icc.surw.chel.su>
PR: 6644 Submitted by: Andrey Zakhvatov <andy@icc.surw.chel.su>