fixing the problem in filter sample