Correct some logic fails