fixed signal handling