fix issue 18
Merge pull request #51 from ywang19/FIX_ISSUE_18

fix issue 18