Always cast COLLECT() to a data type.

Resolves #91.