Fixed the ADSync functionality.