altered code for filter_state box categories view (backend) + fix for search.

altered code for filter_state box categories view (backend) + fix for
categories search. The search was leading into an error so it has been
changed.