Process fix

You might want to check this somewhat. Works in console, but for some reason debugging in xamarin doesn't kill process.