Compatibility fix.
Merge branch 'master' into python23