fixing plugin based on api changes, mainly regarding the handling of arrays