Fixes #4, fixes #15 (bug with multiselect attributes)