fixed a bug that caused 500 error with search filtering