fixes error with categories dropdown closing; applies categories filter to items