Fixed an issue that raised warnings in Drupal 7