Fixed filter switching & seg fault