pull request for issue #1

this fixes issue #1
tested it, works