Correct filters

I applied this fix to a plugin I am working on. I accidentally left the filter handles in the original pull request.

Having three queries is not ideal .. this should be able to be condensed to one query with WP 4.0: https://core.trac.wordpress.org/ticket/24093