fix nil last_sync issue