better signal handling