and the other was submitted by Andrew Belashov <bel@orel.ru>. Thanks to linimon for providing a test bed.