fix notice in template preprocess