Import #173 to 2.0 branch