Fix possible crash error