I was following the pattern in elgg_view_entity(). Will fix.