Fixed some issues with the on-demand filtering