Fixed some core issues