Possible fix to issue #22