Console.log in the IF statement has placement issues.