apply the requested patch to solve issue #20