Fix core tests

Added a fix for some of the broken core tests.