two possible crash fixes