Collection handling fix.

A quick fix on a bug wherein `registerModel` is called under the wrong context.