minor crash fixes