Correct some few bugs