Use (assq-ref (second el) 'piece) instead of (first (assoc-ref (second el) 'piece)), so that if 'piece isn't specified, this line won't crash