Add patch (rev2) from ticket #65