Fixing crash bugs.