fix code issue with restricted filter for api, #170