Fixed bug in core class.