Fix to Drupal 7

TODO: Implement to both version (Drupal 6 and Drupal 7)