Updated script to work with multi-level multi select plugin