Rebase of the pull request #126