variables check was wrong in IfBlock