fixed bug caused by defacing view templates for api calls