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

Fix core.