fixed issue #566; tests added
removed lines
Merge pull request #585 from georgebyelas/master

fixed issue #566; tests added