Fixed the detection of List/Set types to be accurate

Fixes #87, Closes #83