fix template conditional