Tiny patches by Alexey Loginov <loginov.alex.valer@gmail.com>