Core bugs fixed