Fixed issue #2

See the comments in issue #2