Merge pull request #1244 from vkocheganov:bugfix_3179