Avoid NPEs in clear method (and thus finalize method)