Correct some valid and improve core