fix issue #10
Merge pull request #11 from robjhyndman/enhancement

fix issue #10