Fixes for ctrl^c behaviour