apply fix for #4 to 2.0 branch