fix issue #46
Merge pull request #47 from robjhyndman/enhancement

fix issue #46