Bug fix for pull request #2 #3

Merged
merged 3 commits into from Apr 17, 2012