bug fixes in filters and query system.