Use proper view engine when passing an object.