Fixes #5: tighten up handling of signals to make sure they work even when used quickly after startup