Fix Issue #352
Fix Issues pointing out in PR #354
Merge pull request #354 from josehsantos/bug_fixes

Fix Issue #352