Fixed conditional template criteria