Did the same as ViewFilter.m