prevent possible crash