Fixing #Issue 81 in 3.1 branches.