Re-added code to fix sync issue