Fix bug for checking if a filter exists or not