handle sigterm/sigint better