Various core changes
fix build errors