Better error handling for signals.