Fix core.
Merge pull request #500 from gsn/master

Fix core.