Slightly cleaner fix for issue #35