Bug fix for the rewritten spawn_filter function.