backporting sigint13 specific changes into master