Minor fixes for the filtering