More crash fixes