Fix for issue #12, crash