Fix safe filter related issues