A couple crash fixes