Fix NPEs in session loading and network removal

Change-Id: Ib35db5a7ae38f3792c76dad17d6255c7027a7ccd