Better fix for issue #39.