fixes issue #10

(Thanks to the anonymous contributor!)