Added protection in Fragment class so SyncViewModel is not called before the visual tree is actually loaded