Fixed bug of unexpected call to setRootView (called twice)