Move Windows idiocy workaround in a safer place