Changes made by Alexey Mukin (saruman21rus@gmail.com).