Fix bugs.
Merge pull request #5 from DrupalCodeReview/port_d7

Fix bugs.