Moved taskkill to just before window initialization.