Check in debug mode to see what is returned on each step.
Also, you may need to have a condition that will manipulate the list according to state. If state is empty or not. (Empty, you should remove the filtered)