Game freeze when switching windows