Fix bug #9

Fixing bug in issue #9