Fixed terminal signal handlers. v0.5.4