fixed reference template render wrong selected