Fixed issue #15

Committed proposed fix by Tom Knight