Pull request from nikita-n's fork

It look OK for me ... mergin to my fork :-).