minor crash fixes.