fixed bug in pre-filter