Fix compiler errors

Change array to set/list.
Sync with master [1760]

See master branch for further commit information.