Fixed possible crash