Fixing crash described in #19.