Merge from @filinpavel - closes #168