Some crash fixes.