diff --git a/app/views/budgets/investments/_votes.html.erb b/app/views/budgets/investments/_votes.html.erb
index d243535d1..7045ff63b 100644
--- a/app/views/budgets/investments/_votes.html.erb
+++ b/app/views/budgets/investments/_votes.html.erb
@@ -1,6 +1,6 @@
<% reason = investment.reason_for_not_being_selectable_by(current_user) %>
<% voting_allowed = true unless reason.presence == :not_voting_allowed %>
-<% user_voted_for = voted_for?(@budget_investment_votes, investment) %>
+<% user_voted_for = voted_for?(investment_votes, investment) %>
@@ -13,7 +13,7 @@
<%= t("budget.investments.investment.already_supported") %>
- <% elsif @budget.selecting? %>
+ <% elsif investment.budget.selecting? %>
<%= link_to vote_url,
class: "button button-support small expanded",
@@ -40,7 +40,7 @@
<% if user_voted_for && setting['twitter_handle'] %>
- <%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}", url: budget_investment_url(budget_id: @budget.id, id: investment.id), via: setting['twitter_handle']) %>
+ <%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}", url: budget_investment_url(budget_id: investment.budget_id, id: investment.id), via: setting['twitter_handle']) %>
<% end %>