Fixed bug
Added tests
Updated documentation
Merge pull request #1121 from erwinwinder/master

Updated documentation. Added tests