Fix console windows crash