diff --git a/election-candidate.pages.inc b/election-candidate.pages.inc
index 12c168673346fca3eda81b71d903536b46530c2e..6f86072701587305b30d220bd096939c3bc9bb93 100644
--- a/election-candidate.pages.inc
+++ b/election-candidate.pages.inc
@@ -314,12 +314,12 @@ function election_candidate_nomination_form_submit($form, &$form_state) {
 
   $candidate = &$form_state['candidate'];
 
+  $values = $form_state['values'];
+
   // election object won't be changed, no need to pass by reference
   $election = $form_state['election'];
   $post = election_post_load($values['post_id']);
 
-  $values = $form_state['values'];
-
   $candidate->election_id = $election->election_id;
 
   $candidate->post_id = $values['post_id'];