correct some code