Fix another possible crash, and a bit of useless code.