Fix to stop crash when rootObject in null