Fixed core adding bug