fixes a bug in the filter. its almost working alright