diff --git a/components/number.inc b/components/number.inc
index d8434d0..a97511d 100644
--- a/components/number.inc
+++ b/components/number.inc
@@ -315,7 +315,7 @@ function _webform_render_number($component, $value = NULL, $filter = TRUE, $subm
   }
 
   // Ensure #step starts with a zero if a decimal.
-  if (!is_int($element['#step'] * 1)) {
+  if (!is_int((int)$element['#step'] * 1)) {
     $decimals = strlen($element['#step']) - strrpos($element['#step'], '.') - 1;
     $element['#step'] = sprintf('%1.' . $decimals . 'F', $element['#step']);
   }
diff --git a/webform.module b/webform.module
index 48a1516..2c235e7 100644
--- a/webform.module
+++ b/webform.module
@@ -3037,7 +3037,7 @@ function webform_client_form_validate($form, &$form_state) {
 function _webform_client_form_validate(&$elements, &$form_state, $form_id = NULL, $input_values = NULL) {
   if (isset($input_values) && isset($elements['#webform_component'])) {
     $sorter = webform_get_conditional_sorter($form_state['complete form']['#node']);
-    $cid = $elements['#webform_component']['cid'];
+    $cid = !empty($elements['#webform_component']['cid']) ? $elements['#webform_component']['cid'] : 0;
     $page_num = $form_state['values']['details']['page_num'];
     // Webform-specific enhancements:
     // 1) Only validate the field if it was used in this submission.
@@ -3691,7 +3691,11 @@ function template_preprocess_webform_element(&$variables) {
 
   // Convert the parents array into a string, excluding the "submitted" wrapper.
   $nested_level = $element['#parents'][0] == 'submitted' ? 1 : 0;
-  $parents = str_replace('_', '-', implode('--', array_slice($element['#parents'], $nested_level)));
+  $element_parents = '';
+  if (is_array($element['#parents'])) {
+    $element_parents = array_slice($element['#parents'], $nested_level);
+  }
+  $parents = str_replace('_', '-', implode('--', $element_parents));
 
   // Build up a list of classes to apply on the element wrapper.
   $wrapper_classes = array(
