Fix some core issues