Closes #2804. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>