fixed signal handlers for windows