extended test case, resolved segfault, added debug console output. algorithm for detecting signals does not work properly.