Application never stops on Windows

fixes #126