Why does this not work? The output is correct but the last condition does not meet. I am so confused.