fixed broken "if"