Fix NPE when optaining root views