A couple of NPE bugs

Pending bug: can't find fragment after the first removal