diff --git a/jump_menu.module b/jump_menu.module
index f704921..36f55ee 100644
--- a/jump_menu.module
+++ b/jump_menu.module
@@ -210,6 +210,7 @@ function jump_menu_form_select_options($element, $choices = NULL) {
         $choice['#attributes'] = array();
       }
       // Note this make the first item no longer selected, but that doesn't matter.
+      $optValue = (string) $optValue;
       if ($value_valid && (!$value_is_array && (string) $element['#value'] === $optValue || ($value_is_array && in_array($optValue, $element['#value'])))) {
         $selected = ' selected="selected"';
       }
