fixed bug when calling viewservice