Fixed core variable always pointing to NULL.