Fix #730
Merge pull request #732 from guestisp/fix-730

Fix #730
fixed tests.
CONTRIBUTORS: added alessandro corbelli.