Fixing error in pull request and updated documentation (api and
readme).