Fixed badge comparison to use variables properly