Patch from Konstantin Isakov <ikm@pisem.net>: