Fixes the bug described in issue #8