Fix syntax issue with if conditional