alternative fix to issue #1