Bugfix when sorting

Fixed a bug that would appear when sorting in the applications and
manifests tableview. I was using the array instead of the
arraycontroller as reference.