Fixes issue #440
Merge pull request #529 from spankyj/440

Fixes issue #440