Fixed crash when a character is deleted.