correct some function