Fixes #751
Concerning #752: Added test script