fixed view function wrapping.

Signed-off-by: Johny Jose <johny@playlyfe.com>