Merge branch 'for-sergei'. Fixed merging results.