Merge fix for #259 from 2.2 branch