Bug fix in sample filter