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

Merged from beta.