Fix $.unique bug

(this is supposed to be used for DOM elements, not arrays)
Fix nested fields bugs