Attempt to fix a possible crash bug