fixed undefined context error
merged
fixed bug with persisting attributes as sets