fix possible crash