fixes circular reference bug
Merge pull request #4 from Rich-Harris/master

fixes circular reference bug