Fixes #4954 - Fixing several problems in the sync plan API