Bugfixing according to drupal coding standards