Fixed Issue #57 (segfaults in drupal7)