Fix variable name in IF block