fixed possible crash