Resubmitting workaround for #143

This bug still exists, hence resubmitting workaround proposed earlier by others.
Merge pull request #500 from lupinglade/patch-2

Resubmitting fix for #143