Fixed child.stop race condition. Added tests for event filtering.