Fixes the issue #58

Fixed according to discussion in issue #58