Fixed signal handling in streams.