was putting that code in the wrong place. Reverted view_object back to how it was (although I think its incorrect)