Fixing the dynamic sources creation on AddLayer plugin