Fixed NPE's, stored rootmatch